<div class="list_title shadow">
    <php>
        if($category['parent_id']==0) { $parent_category=\app\portal\service\ApiService::category($category['id']); } else { $parent_category=\app\portal\service\ApiService::category($category['parent_id']); }
    </php>
    <span>{$parent_category.name}</span>
    <span>{$parent_category.description}</span>
</div>
<div class="nav_box">
    <ul class="list_ul">
        <if condition="$category.parent_id eq 0">
            <portal:allSubCategories categoryId="$category.id" item="vo_s">
                <li>
                    <a href="{:url('portal/List/index',['id'=>$vo_s['id']])}">{$vo_s.name}</a>
                </li>
            </portal:allSubCategories>
            <else />
            <portal:allSubCategories categoryId="$category.parent_id" item="vo_s">
                <li data-index="{$vo_s['id']}">
                    <a href="{:url('portal/List/index',['id'=>$vo_s['id']])}">{$vo_s.name}</a>
                </li>
            </portal:allSubCategories>
        </if>
    </ul>
    <span class="fot shadow"></span>
</div>
<hr />
<div class="list_title shadow">
    <span>联系我们</span>
    <span>About us</span>
</div>
<div class="contact_box">
    <ul class="ctt_ul">
        <li>
            <span class="cdtitle">地址：</span>
            <span class="cdinfo">{$theme_vars.address_cn|default=''}</span>
        </li>
        <li>
            <span class="cdtitle">邮编：</span>
            <span class="cdinfo">{$theme_vars.zipcode|default=''}</span>
        </li>
        <li>
            <span class="cdtitle">电话：</span>
            <span class="cdinfo">{$theme_vars.phone_cn|default=''}</span>
        </li>
        <li>
            <span class="cdtitle">传真：</span>
            <span class="cdinfo">{$theme_vars.fax|default=''}</span>
        </li>
        <li>
            <span class="cdtitle">邮箱：</span>
            <span class="cdinfo">{$theme_vars.email|default=''}</span>
        </li>
    </ul>
    <span class="fot shadow"></span>
</div>
<script>
    var pid = "{$category.parent_id}";
    var cid = "{$category.id}";
    if (pid > 0) {
        $(".list_ul li").each(function() {
            var index = $(this).data("index");
            if (index == cid) {
                $(this).addClass("current");
            }
        })
    }
</script>